package com.whty.cms.filewps.upload.service.impl;

import com.whty.cms.filewps.common.service.impl.BaseAbstractServiceImpl;
import com.whty.cms.filewps.upload.dao.TeamworkLessonMapper;
import com.whty.cms.filewps.upload.dao.VersionMapper;
import com.whty.cms.filewps.upload.dto.AttachVersion;
import com.whty.cms.filewps.upload.dto.TeamworkLesson;
import com.whty.cms.filewps.upload.service.ILessonService;
import com.whty.cms.filewps.upload.service.IVersionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("versionService")
public class VerionServiceImpl extends BaseAbstractServiceImpl<AttachVersion> implements IVersionService {

    @Autowired
    private VersionMapper versionMapper;

    @Override
    public void save(AttachVersion attachVersion) {
        versionMapper.insert(attachVersion);
    }

    @Override
    public Integer getMaxVerion(String fid) {
        return versionMapper.getMaxVerion(fid);
    }

    @Override
    public List<AttachVersion> getList(String fid) {
        return versionMapper.getList(fid);
    }

    @Override
    public AttachVersion getVersion(AttachVersion version) {
        return versionMapper.getVersion(version);
    }

    @Override
    public String getNewFid(String fid) {
        return versionMapper.getNewFid(fid);
    }
}
